import request from '@/utils/request'

export function getAllBrand() {
  return request({
    url: 'api/getAllBrand',
    method: 'get'
  })
}

export function del(id) {
  return request({
    url: 'api/delTemplateById?id=' + id,
    method: 'get'
  })
}

export function add(data) {
  return request({
    url: 'api/addTemplate',
    method: 'post',
    data: data
  })
}

export function relatedBrand(data) {
  return request({
    url: 'api/relatedBrand',
    method: 'post',
    data: data
  })
}

export function relatedAttribute(data) {
  return request({
    url: 'api/relatedAttribute',
    method: 'post',
    data: data
  })
}

export function getBrandsAndAttr(id) {
  return request({
    url: 'api/getBrandsAndAttr?id=' + id,
    method: 'get'
  })
}

